import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

// 引入UI框架
import uView from "@/common/uview-ui";
Vue.use(uView);
//uni.$u.config.unit = 'rpx'


// 全局引入组件
import navBar from '@/components/custom-nav-bar/custom-nav-bar.vue'
Vue.component('navBar', navBar)
import tabBar from '@/components/custom-tab-bar/custom-tab-bar.vue'
Vue.component('tabBar', tabBar)

// 引入Vuex
let vuexStore = require("@/store/$u.mixin.js");
Vue.mixin(vuexStore);
import store from '@/store';

// 注释控制台Vue警告
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
  ...App
})

// 引入请求拦截器
import httpInterceptor from '@/common/http.interceptor.js'
Vue.use(httpInterceptor, app)
// http接口API集中管理引入部分
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif